<?php

namespace mForge\Modules\Mail;

/**
 * 
 */
class MimePart
{
    /**
     *
     * @var string
     */
    private $charset = 'UTF-8';

    /**
     *
     * @var string
     */
    private $contentDisposition = 'inline';

    /**
     *
     * @var string
     */
    private $contentType;

    /**
     *
     * @var string
     */
    private $data;

    /**
     *
     * @var string
     */
    private $transferEncoding;

    /**
     *
     * @param string $data
     * @param string $contentType
     * @param string $transferEncoding
     */
    public function __construct($data, $contentType = 'text/plain', $transferEncoding = '7bit')
    {
        $this->data = $data;
        $this->contentType = $contentType;
        $this->transferEncoding = $transferEncoding;
    }

    /**
     *
     * @return string
     */
    public function getCharset()
    {
        return $this->charset;
    }

    /**
     *
     * @return string
     */
    public function getContentDisposition()
    {
        return $this->contentDisposition;
    }

    /**
     *
     * @return string
     */
    public function getContentType()
    {
        return $this->contentType;
    }

    /**
     *
     * @return string
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     *
     * @return string
     */
    public function getTransferEncoding()
    {
        return $this->transferEncoding;
    }

    /**
     *
     * @param string $charset
     * @return MimePart
     */
    public function setCharset($charset)
    {
        $this->charset = $charset;
        return $this;
    }

    /**
     *
     * @param boolean $contentDisposition
     * @return MimePart
     */
    public function setContentDisposition($contentDisposition)
    {
        $this->contentDisposition = $contentDisposition;
        return $this;
    }

    /**
     *
     * @param string $contentType
     * @return MimePart
     */
    public function setContentType($contentType)
    {
        $this->contentType = $contentType;
        return $this;
    }

    /**
     *
     * @param string $transferEncoding
     * @return MimePart
     */
    public function setTransferEncoding($transferEncoding)
    {
        $this->transferEncoding = $transferEncoding;
        return $this;
    }
}